<?xml version="1.0" encoding="utf-8" ?>
<nlog
  xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
  autoReload="true"
  throwExceptions="false"
  internalLogLevel="Off">

  <targets>
    <target
      name="DefaultLog"
      xsi:type="File"
      layout="${longdate} [${uppercase:${level:padding=-5}}] ${callsite}() ${message} ${exception:format=tostring}"
      fileName="${specialfolder:folder=ApplicationData}/anoyetta/ACT/logs/FFXIV.Framework.TTS.Server.${shortdate}.log"
      encoding="UTF-8"
      archiveFileName="${specialfolder:folder=ApplicationData}/anoyetta/ACT/logs/archives/FFXIV.Framework.TTS.Server.archive.{#}.log"
      archiveEvery="Day"
      archiveNumbering="Rolling"
      maxArchiveFiles="7" />

    <target
      name="DefaultLogBuffer"
      xsi:type="MethodCall"
      className="FFXIV.Framework.Common.AppLog, FFXIV.Framework"
      methodName="AppendLog">
      <parameter layout="${longdate}" />
      <parameter layout="${level}" />
      <parameter layout="${callsite}" />
      <parameter layout="${message} ${exception:format=tostring}" />
    </target>

    <wrapper-target
      xsi:type="BufferingWrapper"
      name="b"
      bufferSize="3000"
      flushTimeout="5000"
      slidingTimeout="true">
      <target-ref name="DefaultLog" />
    </wrapper-target>
  </targets>

  <rules>
    <logger name="DefaultLogger" minlevel="Trace" writeTo="DefaultLog" />
    <logger name="DefaultLogger" minlevel="Info" writeTo="DefaultLogBuffer" />
  </rules>
</nlog>
